﻿using SqlSugar;

namespace ZeroAdmin.Application.Entity;

/// <summary>
/// 用户表
/// </summary>
[SugarTable("user")]
public class User : DBEntityBase
{
    /// <summary>
    /// 姓名
    /// </summary>
    [SugarColumn(ColumnDataType = "varchar(255)", IsNullable = false)]
    public string UserName { get; set; } = "";

    /// <summary>
    /// 手机号码
    /// </summary>
    [SugarColumn(ColumnDataType = "varchar(255)", IsNullable = false)]
    public string PhoneNumber { get; set; } = "";

    /// <summary>
    /// 密码
    /// </summary>
    [SugarColumn(ColumnDataType = "varchar(255)", IsNullable = true)]
    public string Password { get; set; } = "";

    /// <summary>
    /// 最后登入时间
    /// </summary>
    [SugarColumn(ColumnDataType = "datetime", IsNullable = true)]
    public DateTime LastLoginTime { get; set; }

    /// <summary>
    /// 角色ID
    /// </summary>
    public long RoleId { get; set; }
}
